package com.sann.spring.service.impl;

import com.sann.spring.dao.IAccountDao;
import com.sann.spring.service.IAccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Slf4j
@Service("accountService")
public class AccountServiceImpl implements IAccountService {

    public AccountServiceImpl(){
        log.info("Service 创建了......");
    }

    /**
     * 有了@Autowired注解，setter方法注入就不是必须的了
     */
    @Autowired
    IAccountDao dao;

    @Override
    public void saveAccount() {
        dao.saveAccount();
    }
}
